package com.example.myapplication.item.brick;


import com.example.myapplication.Sprite;
import ohos.agp.render.PixelMapHolder;
import ohos.media.image.PixelMap;

import java.util.List;

/**
 * Created by Miaolonglong on 2021/12/24.
 */

public class Broken extends Sprite {
    public Broken(int width, int height, List<PixelMapHolder> bitmaps) {
        super(width, height, bitmaps);
    }

    @Override
    public void logic() {
        if(isVisiable()){
            nextFrame();
            move(0,-3);
            if(getFrameSequenceIndex()==0){
                setVisiable(false);
            }
        }
    }
}
